<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
    <title>EGW200</title>
    <link rel="stylesheet" href="css/style.css">
    <link rel="icon" href="./img/favicon.ico">
    <style>
        .icon {
            position: absolute;
            right: 0;
            top: 0;
            display: inline-block;
            width: 44px;
            height: 44px;
            cursor: pointer
        }

        .icon:after {
            content: "";
            position: absolute;
            top: 15px;
            left: 15px;
            width: 10px;
            height: 10px;
            border-bottom: 2px solid #999;
            border-right: 2px solid #999;
            transform: rotate(45deg)
        }

        #ssid {
            padding-right: 45px
        }

        .wifi-list-wrap {
            position: absolute;
            left: 0;
            top: 45px;
            background: #fff;
            padding: 6px 0;
            box-shadow: 0 0 6px #ccc;
            z-index: 1;
            border-radius: 6px;
            width: 100%;
            max-height: 300px;
            overflow: hidden;
            overflow-y: auto;
            text-align: left;
            box-sizing: border-box
        }

        .wifi-list-wrap ul {
            width: 100%;
            list-style: none
        }

        .wifi-list-wrap li {
            display: block;
            position: relative;
            line-height: 2.1;
            font-size: 14px;
            color: #666;
            padding: 4px 40px;
            box-sizing: border-box;
            cursor: pointer;
            width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap
        }

        .wifi-list-wrap li:hover {
            background: rgba(102, 170, 254, .5)
        }

        .wifi-list-wrap .selected {
            position: absolute;
            top: 12px;
            left: 15px;
            display: none;
            width: 12px;
            height: 6px;
            border-left: 2px solid #66aafe;
            border-bottom: 2px solid #66aafe;
            transform: rotate(-45deg)
        }

        .wifi-list-wrap li.active .selected {
            display: inline-block
        }

        .lock-img {
            position: absolute;
            top: 9px;
            right: 15px;
            width: 20px;
            height: 20px
        }

        .lock-img svg {
            width: 18px;
            height: auto
        }
    </style>
    <script src="js/common.js"></script>
    <script src="js/wlan.js"></script>
</head>

<body id="body-wrap">
<div class="home-base">
    <div class="header-base">
        <!-- <img class="header-logo" src="./img/logoBlack.png"> -->
        <div class="header-menu" onclick="menuClick(this)">
        </div>
    </div>
    <div class="content-base flex">
        <div class="left-base" id="leftMenu">
<!--            <div class="left-title">系统菜单</div>-->
            <ul>
                <li>
                <a href="index.html" id="idLeftMenuHome" class="">系统状态</a>
                </li>
                <li>
                    <a href="network.html" id="idLeftMenuNetwork" class="">网络设置</a>
                </li>
                <li>
                    <a href="wlan.html" id="idLeftMenuWLAN" class="">Wi-Fi设置</a>
                </li>
            <!--                <li>-->
            <!--                    <a href="">流量统计</a>-->
            <!--                </li>-->
                <li>
                <a href="device.html" id="idLeftMenuDevice" class="">网关功能</a>
                </li>
                <li>
                    <a href="ota.html" id="idLeftMenuOTA" class="">固件更新</a>
                </li>
            </ul>
        </div>
        <div class="right-base">
            <div class="page-header">
                <span class="header-title-one" onclick="selectTitle(this),selectContent('baseShow')">AP基本设置</span>
                <span>/</span>
                <span class="header-title-one" onclick="selectTitle(this),selectContent('highShow')">AP高级设置</span>
                <span>/</span>
                <span class="header-title-one" onclick="selectTitle(this),selectContent('wifiSTAShow')">STA配网</span>
            </div>
            <div class="page-content" id="baseShow">
                <div class="page-title">以下您可以对 WLAN 进行基本设置</div>
                <div class="page-detail">
                    <div class="line-base">
                        <span class="title">WLAN 名称:</span>
                        <input class="content" id="wlanName" placeholder="请输入 WLAN 名称">
                    </div>
                    <div class="line-base">
                        <span class="title">安全模式:</span>
                        <select class="content" id="model" name="chian"><!--下拉列表-->
                            <option value="OPEN">不加密</option>
                            <option value="WEP">WEP</option>
                            <option value="WPA2_PSK" selected="selected">WPA2PSK</option>
                            <option value="WPA_WPA2_PSK">WPA/WPA2-PSK</option>
                        </select>
                    </div>
                    <div class="line-base">
                        <span class="title">密码:</span>
                        <input class="content" id="password" placeholder="请输入密码">
                    </div>
                    <div class="line-base flex flex-ac">
                        <span class="title">WLAN 隐身:</span>
                        <input class="content-two" type="checkbox" id="select" name="sel"/>
                        <span class="content-thr">WLAN 开启后，需要您必须在终端上输入正确的 WLAN名称才能连接到 WLAN 并且 WLAN WPS 将不可用</span>
                    </div>
                    <div class="line-base-btn">
                        <button class="save-btn" onclick="baseSave()">保存</button>
                    </div>
                </div>
            </div>
            <div class="page-content" id="highShow">
                <div class="page-title">您可以对 WLAN 设置以下两项个性化设置</div>
                <div class="page-detail">
                    <div class="line-base">
                        <span class="title">宽带:</span>
                        <select class="content" id="broadband" name="chian"><!--下拉列表-->
                            <option value="20" selected="selected">20MHz</option>
                            <option value="40">40MHz</option>
                        </select>
                    </div>
                    <div class="line-base">
                        <span class="title">信道:</span>
                        <select class="content" id="channel" name="chian"><!--下拉列表-->
<!--                            <option value="0" selected="selected">自动</option>-->
                            <option value="1" selected="selected">1</option>
                            <option value="2" >2</option>
                            <option value="3">3</option>
                            <option value="4">4</option>
                            <option value="5">5</option>
                            <option value="6" >6</option>
                            <option value="7">7</option>
                            <option value="8">8</option>
                            <option value="9">9</option>
                            <option value="10">10</option>
                            <option value="11" >11</option>
                            <option value="12">12</option>
                            <option value="13">13</option>
                        </select>
                    </div>
                    <div class="line-base-btn">
                        <button class="save-btn" onclick="highSave()">保存</button>
                    </div>
                </div>
            </div>

            <div class="page-content" id="wifiSTAShow">
                <div class="page-title">加入Wi-Fi</div>
                <div class="page-detail">
                    <div id="ssid-wrap" class="line-base">
                        <span class="title">Wi-Fi名称</span>
                        <input id="sta-ssid" maxlength="32" type="text" />
                    </div>
                    <div class="line-base">
                        <span class="title">附近的Wi-Fi</span>
                        <button id="show-wifi-list">扫描</button>
                    </div>
                    <div class="line-base">
                        <span class="title">Wi-Fi密码</span>
                        <input id="sta-password" maxlength="64" type="password"/>
                    </div>
                    <div class="line-base">
                        <span class="title">状态</span>
                        <input id="sta-message" disabled type="text" readonly/>
                    </div>

                    <div class="line-base-btn">
                        <button id="sta-start-connect" onclick="postStaData()" class="save-btn">
                            连接
                        </button>
                    </div>
                    <div class="note-wrap line-base">
                        <span id="note-text" style="color: red">
                            Note:
                        </span>
                        <span id="note-desc">配网手机作为待接入热点时，浏览器可能收不到配网结果.</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
  initHash();
  window.addEventListener('hashchange', function() {
    initHash();
  })
</script>
</body>

</html>
